<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * LoginForm is the model behind the login form.
 */
class AidForm extends Model
{
    public $command;


    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            // username and password are both required
            [['command'], 'required'],
            ['command','string'],
        ];
    }

    public function load($data, $formName = null){
        $flag = true;
        if(!empty($_POST["command"])){
            $this->command = $_POST["command"];
        }else{
            $flag = false;
        }
        return $flag;
    }

}
